package com.druid.app.model;

import com.alibaba.druid.support.json.JSONUtils;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 学生类
 */
@Entity
@Table(name = "student")
public class Student {

    /**主键*/
    @Id
    @Column(name = "ID")
    private Integer id;
    /**学号*/
    @Column(name = "STU_ID")
    private String stuId;
    /**姓名*/
    @Column(name = "NAME")
    private String name;
    /**年龄*/
    @Column(name = "AGE")
    private Integer age;
    /**性别*/
    @Column(name = "SEX")
    private Integer sex;
    public  Student(){

    }

    public  Student(Integer id,String stuId,String name,Integer age,Integer sex){
        this.id = id;
        this.stuId = stuId;
        this.name = name;
        this.age= age;
        this.sex = sex;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getStuId() {
        return stuId;
    }

    public void setStuId(String stuId) {
        this.stuId = stuId;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    @Override
    public String toString(){
        return ("学号:"+this.stuId+"姓名:"+this.name+"年龄:"+this.age+"性别:"+this.sex);
    }
}
